  <div id="menu">
    <ul>
       <div id="left">
      <li 
        <?php if(isset($page_name) && $page_name == home){
          echo 'class="active"';
        } ?>      
        ><a href="index.php">Home</a></li>
      <li 
        <?php if(isset($page_name) && $page_name == media){
          echo 'class="active"';
        } ?>      
        ><a href="media.php">Media</a></li>
	  <li 
        <?php if(isset($page_name) && $page_name == friends){
          echo 'class="active"';
        } ?>      
        ><a href="friends.php">Friends</a></li>
	  <li 
        <?php if(isset($page_name) && $page_name == account){
          echo 'class="active"';
        } ?>      
        ><a href="account.php">Account</a></li>
       </div>
	  <div id="right">

	  
      <li 
        <?php if(isset($page_name) && $page_name == addmedia){
          echo 'class="active"';
        } ?>      
        ><a href="addmedia.php">Add Media</a></li>
      
        <?php if(isset($page_name) && ($page_name == login || $page_name == register)){ 
            // Page is Login 
            echo '<li class="active"><a href="login.php">login</a></li>';
            } else {
            echo '<li><a href="login.php?status=loggedout">logout</a></li>';}?> 
        </div>
    </ul>
  </div> <!-- end div#menu -->